﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/public/include/taglib.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh">
<head>
<title>重庆邮政XXXX管理平台</title>
<meta name="decorator" content="decDefault" />
<script type="text/javascript">
	//全局变量
	var basePath = "${basePath}";
	var aPath="${aPath}";
	$(document).ready(function(){
		$('#loginButton').click(function(){
			login();
		});
	});

	function login(){
		var syscode=$('#syscode').val();
		var clientType=$('#clientType').val();
		var backurl=$('#backurl').val();
		
		$.ajax({
			url : aPath + '/login',
			type : 'POST',
			data : {
				usercode : $('#usercode').val(),
				password : $('#password').val(),
				rememberMe : $('#rememberMe').is(':checked')
			},
			beforeSend : function(){

			},
			success : function(json){
				if (json.code == 111) {
					//get请求进行token回调
					location.href =aPath+"/login?syscode="+syscode+"&clientType="+clientType+"&backurl="+backurl;
				} else {
					$("#tipmsg").text(json.msg);
				}
			},
			error : function(error){
				console.log(error);
			}
		});
	}
</script>
</head>
<body class="signin">
	<section>
	<div class="signinpanel">
		<div class="row">
			<div class="col-md-7">
				<div class="signin-info">
					<div class="logopanel">
						<h1>
							<img src="${imagesPath}/rock/login/dhc-logo-inverse.png" alt="" />
							全渠道运营管理平台
						</h1>
					</div>
					<!-- logopanel -->
					<div class="mb20"></div>
					<h5>
						<strong>${loginPageMsg}欢迎登录重庆邮政XXXX管理平台:${fns:getSysName()}</strong>
					</h5>
					<ul>
						<li>
							<i class="fa fa-arrow-circle-o-right mr5"></i>
							商品管理
						</li>
						<li>
							<i class="fa fa-arrow-circle-o-right mr5"></i>
							系统管理
						</li>
						<li>
							<i class="fa fa-arrow-circle-o-right mr5"></i>
							订单管理
						</li>
						<li>
							<i class="fa fa-arrow-circle-o-right mr5"></i>
							发货管理
						</li>
						<li>
							<i class="fa fa-arrow-circle-o-right mr5"></i>
							库存管理
						</li>
					</ul>
				</div>
				<!-- signin0-info -->
			</div>
			<!-- col-sm-7 -->
			<div class="col-md-5">
				<form action="">
					<input type="hidden" id="syscode" value="${syscode}" />
					<input type="hidden" id="backurl" value="${backurl}" />
					<input type="hidden" id="clientType" value="${clientType}" />
					<h4 class="nomargin">登录</h4>
					<p class="mt5 mb20">请输入您的帐号密码登录。</p>
					<input type="text" id="usercode" class="form-control uname" placeholder="用户名" />
					<input type="password" id="password" class="form-control pword" placeholder="密码" />
					<small>记住我</small>
					<input id="rememberMe" type="checkbox" class="checkbix" data-text="自动登录" name="rememberMe">
					<br>
					<a href="">
						<small>忘记密码？</small>
					</a>
					<p id="tipmsg" class="text-danger"></p>
				</form>
				<button class="btn btn-success btn-block" id="loginButton">登录</button>
			</div>
			<!-- col-sm-5 -->
		</div>
		<!-- row -->
		<div class="signup-footer">
			<div class="pull-left">
				&copy; 2017. 版权所有
				<i class="fa fa-copyright"></i>
				中国邮政集团公司重庆市信息技术局
			</div>
			<div class="pull-right">
				技术支持：
				<a href="http://www.cqpost.com" target="_blank">DHC</a>
			</div>
		</div>
	</div>
	</section>
</body>
</html>
